﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace MovieRental.SqlRepositoryLibrary.Configuration
{
    public class ConnectionConfigurationElement : ConfigurationElement
    {
        [ConfigurationProperty("server", IsRequired = true)]
        public string Server
        {
            get { return (string)base["server"]; }
            set { base["server"] = value; }
        }

        [ConfigurationProperty("database", IsRequired = true)]
        public string Database
        {
            get { return (string)base["database"]; }
            set { base["database"] = value; }
        }

        [ConfigurationProperty("user", IsRequired = false)]
        public string User
        {
            get { return (string)base["user"]; }
            set { base["user"] = value; }
        }

        [ConfigurationProperty("password", IsRequired = false)]
        public string Password
        {
            get { return (string)base["password"]; }
            set { base["password"] = value; }
        }

        [ConfigurationProperty("pooling", IsRequired = false)]
        public bool Pooling
        {
            get { return (bool) base["pooling"]; }
            set { base["pooling"] = value; }
        }
    }
}
